aerc: provide default keybindings as baseline for cfg.extraBinds#9030
aerc: provide default keybindings as baseline for cfg.extraBinds#9030kfiz wants to merge 1 commit intonix-community:masterfrom
Conversation
khaneliman
left a comment
There was a problem hiding this comment.
remove the random binary file
Currently setting up additional keybindings in aerc via extraBinds leaves aerc literally unusable as these overwrite the default keybindings. This pr changes this so that keybindings specified in extraBinds extend / overwrite the default keybindings.
This would be a pretty big breaking change for users of the module that have configured their own keybinds with the expectation of the current behavior.. But, I do agree it makes sense that extra is additional instead of replace. how does aerc resolve the config? Will
I agree. To keep the current behaviour for these users the only option I can currently think of is to add an additional setting with an appropriate name for the use case I'm targeting here. Something called e.g.
Edit: For users depending on the current behaviour any keybindings that were previously specified via this setting should still hold, since in case of duplicate keybindings the latter prevail, see https://aerc-docs.com/reference/aerc-binds.5/. So the only effect they might see is that there are some new keybindings that they hadn't configured before (... and that they are thus not using?) ... |
@khaneliman What do you think? Might not be a breaking change at all. |
Ugh... I hate that kind of config handling. I'm definitely not a fan of just copy pasting the current defaults in and having to maintain that here... I'm always thinking about what the solution will look like months down the line when someone complains that upstream defaults aren't being respected. Looking at the docs upstream, it seems like there isn't much flexibility in their config system. |
I understand and I'm happy to go back to just using |
agreed. From the manpage it's not obvious one has to redefine all mappings ? Cant we define just a few https://man.archlinux.org/man/aerc-binds.5.en and aerc merge them ? |
Not sure I follow ... . So currently if a user wants to add new/additional keybindings via Non-nix users would just add their new/additional keybindings to the default |
|
sry I dont know aerc and I might have missed some previous explanation but typically programs have a set of builtins and binds.conf would be merged. Seems like aerc just starts with 0 bindings if binds.conf exists, forcing you to re-create every binding. Is this correct ? |
No worries. No, aerc reads all bindings from The binds.conf file is used for configuring keybindings used in the aerc interactive client. |
Description
Currently setting up additional keybindings in aerc via
extraBindsleaves aerc literally unusable as these overwrite the default keybindings. This pr changes this so that keybindings specified inextraBindsextend / overwrite the default keybindings.cc @teto @khaneliman since both of you looked at the previous
aercprChecklist
[ x] Change is backwards compatible.
[ x] Code formatted with
nix fmtornix-shell -p treefmt nixfmt deadnix keep-sorted nixf-diagnose --run treefmt.Code tested through
nix run .#tests -- test-allornix-shell --pure tests -A run.all.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
If this PR adds an exciting new feature or contains a breaking change.